<?php

jimport('joomla.application.component.controller');

class bgController extends JController {
    public function display($cachable = false, $urlparams = false) {
        parent::display($cachable, $urlparams);
    }
    
    public function save(){

        $funcs = JRequest::getVar('func');
        
        $model = $this->getModel();
        if(!$model->save($funcs)){
            JFactory::getApplication()->enqueueMessage('Update permission is failed! Try again, please', 'error');
        }

        parent::display();
    }
    
    public function cancel(){
    	$this->setRedirect('index.php');
    }

}